/**
 * Created by Aber on 17/3/22.
 */
define('lun',function () {

})
// 加载模块
module.exports = function(ngModule) {
    require('./lun.scss');
    ngModule.directive('lun',function () {
        return {
            restrict: 'E',//元素(element)
            scope: {title:'@title',url:'@url',color:"@color"},
            replace: true,
            template: require('./lun.html'),//模板
            controllerAs: 'lun',// <=> $scope.vm = {greeting: '你好，我是卡哥'}
            controller: function () {
            },
            link: function (scope,elements,attrs) {
                console.log(scope,elements,attrs)
                elements.bind('click', function () {
                    console.log(elements)
                    elements.css('background-color','blue');
                })
            }
        }
    });//定义指令，对应页面中的<hello-world></hello-world>
    require(['lun'], function (my){
        var $ = require('jquery');
        $(function () {

        })
    });
}